print("hello python")
a = 2
b = 3
if a>b:
    print("a max")
else:
    print("b max")

for s in "hello":
    print(s)

for i in range(5):
    print(i)
print()
# 列表
lists = [1,2,3,'a',5]
print(lists[2])
# 元组
tup1=('a','b',3,4)
tup2=(1,2,3)
print(tup1[0])
print(tup2[0:2]) #代表[0,2)左闭右开
# 连接元组
tup3 = tup1+tup2
print(tup3)
# 复制元组
tup4=("Hi")
print(tup4*3)
# 列表是可变的（可追加，可修改，可删除），元组是不可变的

# 字典
# {"key":"value",...}
dicts = {"username":"zhangsan","password":123456}
# 打印字典中的所有key
print(dicts.keys())
# 打印字典中的所有value
print(dicts.values())

# 向字典中添加键值对
dicts["age"]=22
# 打印字典中的所有key
print(dicts.keys())
# 打印字典中的所有value
print(dicts.values())

# 循环打印
for k,v in dicts.items():
    print("dicts keys is %r " %k)
    print("dicts values is %r " %v)

# 删除键是password的项
dicts.pop("password")
# 打印字典以列表形式返回
print(dicts.items())


